#ifndef EGG_POSTPROCESS_H
#define EGG_POSTPROCESS_H

#include "RenderContext.h"
#include "GlobalGeometryGroup.h"
#include "GlobalGPUParamGroup.h"
#include "GlobalGPUProgramGroup.h"
#include "GlobalRenderTargetGroup.h"

namespace egg{

    class PostEffect{
    public:
        PostEffect(GPUProgramPtr _pro):
        mParamMap(_pro){

        }
    public:
        virtual void render(RenderContext& _context)=0;

        virtual void setPixelMask(uint32 _mask){
            if(_mask==0){
                mStateCache.mStencilState.mTest=false;
            }else{
                mStateCache.mStencilState.mTest=true;
                mStateCache.mStencilState.mMask=_mask;
            }
        }
    protected:
        GPUParamMap mParamMap;
        StateCache mStateCache;
    };

}

#endif